import { makeAutoObservable } from 'mobx'


class Contentstore{
    //定义数据
    visible = false
    changecount = 0
    constructor(){
        makeAutoObservable(this)
    }
    //定义action函数(修改数据)
    openContent = () => {
        this.visible = true
    }
    closeContent = () => {
        this.visible = false
    }
    changeCount = () => {
        this.changecount++
    }
}

//实例化 导出给react使用
const contentStore = new Contentstore()
export { contentStore }